package cn.lanqiao.system.mapper;
import cn.lanqiao.common.entity.User;
import org.apache.ibatis.annotations.Param;
import java.util.List;

public interface UserMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(User record);

    //用户注册
    int insertSelective(User record);

    User selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    Integer UserRegister(User user);//添加用户
    Integer deleteUser(long userid);//删除用户
    int batchDeleteUser(Integer[] ids);//批量删除用户
    Integer updateUserInfo(User user);//更新用户
    List<User> findUserByName(String username);
    List<User> findAllUser();//查找所有用户
    List<User> getTypeId(Integer typeId);
    //验证码登录
    User findUserByUserNameAndPassword(@Param("username") String username, @Param("password") String password);
    //根据id查找用户
    User findById(Integer id);

    User getUserById(Integer id);
}